#include "xdemux_task.h"
#include "xtools.h"
#include <iostream>
#include <thread>
#ifdef main
#undef main
#endif // !main
using namespace std;
#define CAM1 "rtsp://127.0.0.1:8554/test"
int main(int argc, char *argv[]) {
  XDemuxTask det;
  for (;;) {
    if (det.Open(CAM1)) {
      break;
    }
    MSleep(100);
    continue;
  }

  det.Start();
  // TestThread tt;
  // tt.Start();
  // this_thread::sleep_for(3s);
  // tt.Stop();
  getchar();
  return 0;
}
